package com.meilai.project.constant;

import lombok.Getter;

@Getter
public enum BFCustomerTypeEnum {
    PERSONAL(1, "个人盘"),
    COMPANY(2, "公司盘");

    private Integer id;
    private String name;


    BFCustomerTypeEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public static BFCustomerTypeEnum getEnumById(Integer id) {
        for (BFCustomerTypeEnum cur : BFCustomerTypeEnum.values()) {
            if (cur.getId().equals(id)) {
                return cur;
            }
        }
        return null;
    }
}
